#ifndef MODEUPDATE_H
#define MODEUPDATE_H

#include <QObject>
#include <osg/NodeCallback>
class ModeUpdate : public QObject, public osg::NodeCallback
{
	Q_OBJECT

public:
	ModeUpdate(QObject *parent=0);
	~ModeUpdate();
	virtual void operator()(osg::Node* node, osg::NodeVisitor* nv);
	
public slots:
	void recevieMode(int mode);
private:
	int _currentMode;
	int _previousMode;
	OpenThreads::Mutex _mutex;
};

#endif // MODEUPDATE_H
